﻿@using EasyUIMvc
@{
    ViewBag.Title = "DialogToolbar";
}

<h2>DialogToolbar</h2>
@Html.EasyUI().DialogToolbar(settings =>
                      {
                          settings.Id = "DialogToolbar";
                          settings.Title = "Dialog Toolbar Sample";
                          settings.DataOptions = "iconCls: 'icon-save'," +
                                                    "toolbar: [{"+
                                                        "text:'Thêm',"+
                                                        "iconCls:'icon-add',"+
                                                        "handler:function(){"+
                                                            "alert('add')"+
                                                        "}"+
                                                    "},'-',{"+
                                                        "text:'Lưu',"+
                                                        "iconCls:'icon-save',"+
                                                        "handler:function(){"+
                                                            "alert('save')"+
                                                        "}"+
                                                    "},'-',{" +
                                                        "text:'Giúp'," +
                                                        "iconCls:'icon-help'," +
                                                        "handler:function(){" +
                                                            "alert('Help')" +
                                                        "}" +
                                                    "}],"+
                                                    "buttons: [{"+
                                                        "text:'Đồng ý',"+
                                                        "iconCls:'icon-ok',"+
                                                        "handler:function(){"+
                                                            "alert('ok');"+
                                                        "}"+
                                                    "},{"+
                                                        "text:'Hủy bỏ',"+
                                                        "iconCls:'icon-cancel'," +
                                                        "handler:function(){"+
                                                            "alert('cancel');;"+
                                                        "}"+
                                                    "}]";
                          settings.Style = "width:600px;height:400px;padding:5px";
                      }).Content("ABC").GetHtml()